package com.itany.service;

import com.github.pagehelper.PageInfo;
import com.itany.exception.ManagerServiceException;
import com.itany.pojo.BookType;
import com.itany.pojo.BookWithBLOBs;
import com.itany.pojo.Press;

public interface BookService {


    /**
     * 爬虫添加数据测试
     * 添加书籍 包括出版商 和 商品类型表
     */
    Integer addBook(BookWithBLOBs book, String pressName, String bookType, String bookType2) throws ManagerServiceException;

    Integer addBook(BookWithBLOBs book) throws ManagerServiceException;

    BookWithBLOBs selectBookBy(String isbn) throws ManagerServiceException;

    Press selectPressBy(String pressName);

    BookType selectBookTypeBy(String bookType);

    Integer addPress(String pressName) throws ManagerServiceException;

    Integer addBookType(String bookType, Integer pid) throws ManagerServiceException;


    PageInfo<BookWithBLOBs> selectExample(Integer page, Integer rows, BookWithBLOBs book, Integer supplierid);

    PageInfo<BookWithBLOBs> selectExample(Integer page, Integer rows, String bookname, String isbn, Integer pressid, Integer supplierid);

    BookWithBLOBs findIsbn(String isbn) throws ManagerServiceException;


    void update(BookWithBLOBs book) throws ManagerServiceException;

    BookWithBLOBs selectById(Integer id);

    PageInfo<BookWithBLOBs> supplierFindAll(Integer page, Integer rows, Integer supplierid, String bookname, String isbn);
}
